package com.cqc.other.juc.producerConsumer.blockingQueue.demo2;


public class ProducerThread extends Thread {

    private Container container;

    public ProducerThread(Container container) {
        this.container = container;
    }

    @Override
    public void run() {
        //使用队列： ArrayBlockingQueue LinkedBlockingQueue
//        for (int i = 0; i < 4; i++) {
//            container.add(i);
//        }
        //使用 PriorityBlockingQueue 队列时
        container.add(5);
        container.add(3);
        container.add(1);
        container.add(2);
        container.add(0);
        container.add(4);
    }
}
